from django.db import models


class Lotto (models.Model):
    date = models.DateField ();
    n1 = models.PositiveSmallIntegerField ();
    n2 = models.PositiveSmallIntegerField ();
    n3 = models.PositiveSmallIntegerField ();
    n4 = models.PositiveSmallIntegerField ();
    n5 = models.PositiveSmallIntegerField ();
    n6 = models.PositiveSmallIntegerField ();
    
    def as_list (self):
        return [self.n1, self.n2, self.n3, self.n4, self.n5, self.n6];
    
    def as_str (self):
        return '%s\t%s\t%s\t%s\t%s\t%s' % (self.n1, self.n2, self.n3, self.n4, self.n5, self.n6);
    
    def to_str (self):
        return 'Lotto';
    
    def __unicode__ (self):
        return str(self.date);


class MiniLotto (models.Model):
    date = models.DateField ();
    n1 = models.PositiveSmallIntegerField ();
    n2 = models.PositiveSmallIntegerField ();
    n3 = models.PositiveSmallIntegerField ();
    n4 = models.PositiveSmallIntegerField ();
    n5 = models.PositiveSmallIntegerField ();
    
    def as_list (self):
        return [self.n1, self.n2, self.n3, self.n4, self.n5];
    
    def as_str (self):
        return '%s\t%s\t%s\t%s\t%s' % (self.n1, self.n2, self.n3, self.n4, self.n5);
    
    def to_str (self):
        return 'Mini Lotto';
    
    def __unicode__ (self):
        return str(self.date);


class MultiMulti (models.Model):
    date = models.DateField ();
    n1 = models.PositiveSmallIntegerField ();
    n2 = models.PositiveSmallIntegerField ();
    n3 = models.PositiveSmallIntegerField ();
    n4 = models.PositiveSmallIntegerField ();
    n5 = models.PositiveSmallIntegerField ();
    n6 = models.PositiveSmallIntegerField ();
    n7 = models.PositiveSmallIntegerField ();
    n8 = models.PositiveSmallIntegerField ();
    n9 = models.PositiveSmallIntegerField ();
    n10 = models.PositiveSmallIntegerField ();
    n11 = models.PositiveSmallIntegerField ();
    n12 = models.PositiveSmallIntegerField ();
    n13 = models.PositiveSmallIntegerField ();
    n14 = models.PositiveSmallIntegerField ();
    n15 = models.PositiveSmallIntegerField ();
    n16 = models.PositiveSmallIntegerField ();
    n17 = models.PositiveSmallIntegerField ();
    n18 = models.PositiveSmallIntegerField ();
    n19 = models.PositiveSmallIntegerField ();
    pls = models.PositiveSmallIntegerField ();
    
    def as_list (self):
        return [self.n1, self.n2, self.n3, self.n4, self.n5, self.n6, self.n7, self.n8, self.n9, self.n10, self.n11, self.n12, self.n13, self.n14, self.n15, self.n16, self.n17, self.n18, self.n19, self.pls];
    
    def as_str (self):
        return '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s' % (self.n1, self.n2, self.n3, self.n4, self.n5, self.n6, self.n7, self.n8, self.n9, self.n10, self.n11, self.n12, self.n13, self.n14, self.n15, self.n16, self.n17, self.n18, self.n19, self.pls);
    
    def to_str (self):
        return 'Multi Multi';
    
    def __unicode__ (self):
        return str(self.date);


class Kaskada (models.Model):
    date = models.DateField ();
    n1 = models.PositiveSmallIntegerField ();
    n2 = models.PositiveSmallIntegerField ();
    n3 = models.PositiveSmallIntegerField ();
    n4 = models.PositiveSmallIntegerField ();
    n5 = models.PositiveSmallIntegerField ();
    n6 = models.PositiveSmallIntegerField ();
    n7 = models.PositiveSmallIntegerField ();
    n8 = models.PositiveSmallIntegerField ();
    n9 = models.PositiveSmallIntegerField ();
    n10 = models.PositiveSmallIntegerField ();
    n11 = models.PositiveSmallIntegerField ();
    n12 = models.PositiveSmallIntegerField ();

    
    def as_list (self):
        return [self.n1, self.n2, self.n3, self.n4, self.n5, self.n6, self.n7, self.n8, self.n9, self.n10, self.n11, self.n12];
    
    def as_str (self):
        return '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s' % (self.n1, self.n2, self.n3, self.n4, self.n5, self.n6, self.n7, self.n8, self.n9, self.n10, self.n11, self.n12);
    
    def to_str (self):
        return 'Kaskada';
    
    def __unicode__ (self):
        return str(self.date);


class Joker (models.Model):
    date = models.DateField ();
    jr = models.PositiveSmallIntegerField ();
    n1 = models.PositiveSmallIntegerField ();
    n2 = models.PositiveSmallIntegerField ();
    n3 = models.PositiveSmallIntegerField ();
    n4 = models.PositiveSmallIntegerField ();
    
    def as_list (self):
        return [self.jr, self.n1, self.n2, self.n3, self.n4];
    
    def as_str (self):
        return '%s\t%s\t%s\t%s\t%s' % (self.jr, self.n1, self.n2, self.n3, self.n4);
    
    def to_str (self):
        return 'Joker';
    
    def __unicode__ (self):
        return str(self.date);

